home *** CD-ROM | disk | FTP | other *** search
- Subject: Re: ODF Popups
- Sent: 6/12/96 9:49 AM
- Received: 6/12/96 10:12 AM
- From: Laurent Delamare, laurentd@apple.com
- Reply-To: ODF Interest, ODF-Interest@CILabs.ORG
- To: OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
-
- >My resource looks like this:
- >
- >FW_RPopupMenu
- >(
- > krInitialFont, // identifier
- > { FW_FIX()...FW_FIX() }, // coordinates
- > FW_kFixedBounds,
- > FW_kPopupClickedMsg,
- > FW_kFrameReceiver,
- > 0,
- > krInitialMenu, // resource id
- > 0,
- > 1,
- > 4, // popupUseAddResMenu
- > 'FONT',
- > GENEVA9, // font
- > ""
- >)
- >
- >I want my popup to show all FONT's in my system. According to the
- >comments in the ODF files and from what I know from Inside Macintosh
- >this should work. But it doesn't. With this resource there is no popup
- >at all in my view.
-
- Your problem may come from the fact that you haven't defined a MENU
- resource with the id "krInitialMenu" in your part. I just tried to
- modify ODF Form's Views.fr, putting 4 and 'FONT' in the first popup
- menu resource (kBrowseTimePopupID), and it does show the list of
- fonts in addition to the 4 menu items of MENU #1000.
- So you must define at least an empty MENU resource otherwise the
- control manager doesn't create the popup.
-
- > When I replace 4 and 'FONT' with 0 and 0 everything
- >works ok. Where am I missing the point?
-
- What do you mean "everything works ok"? You get your regular popup
- but not the fonts, right?
-
- >Are there any good ODF-samples on how to do this? I know they
- >exist in the OpenDoc samples, but I want to do it the ODF-way.
-
- The only ODF 1 sample using popups is Form. The engineering note
- "Using Controls" and the file "FWViews.fr" mention the fact that
- one can use 'FONT' for the MenuRefCon attribute, but we could make
- things clearer.
-
- >2)
- >For the menubar I can use a new resourcetype in an .fr file. Can we
- >expect the same solution for popup menu's? Now we have to use 'MENU'
- >resources and that seems to strictly Mac to me.
-
- Yes this is a current restriction of FW_CPopupMenu views, you must
- define a Mac MENU resource. We did it this way in ODF 1 because
- the Mac Control manager refuses to work if there is no MENU resource
- present in the shared library.
- When we make ODF views work on Windows we'll use ODFRC menu resources
- and at that time we may update the Mac version (ODF will need to draw
- and handle popup menus by itself and not rely on the Control mgr).
-
-
- ______________________________________________________________________
- Laurent Delamare laurentd@apple.com
- ODF Team http://www.devtools.apple.com/odf/
- Apple Computer, Inc. http://www.opendoc.apple.com/
-